package com.daona.application;

import com.daona.infrastructure.common.SpringContextUtil;
import com.feiniaojin.gracefulresponse.EnableGracefulResponse;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@EnableGracefulResponse
@MapperScan("com.daona.infrastructure.repository.db.mapper")
@ComponentScan(basePackages = {
        "com.daona.application", // current base package
        "com.daona.infrastructure.config",
        "com.daona.infrastructure.minio"
})
public class DaonaApplication {
    public static void main(String[] args) {
        ApplicationContext app = SpringApplication.run(DaonaApplication.class, args);
        SpringContextUtil.setApplicationContext(app);
    }
}
